
-- --------------------------------------------------
-- Entity Designer DDL Script for SQL Server 2005, 2008, 2012 and Azure
-- --------------------------------------------------
-- Date Created: 01/09/2018 14:36:18
-- Generated from EDMX file: C:\Users\admin\Desktop\新建文件夹 (2)\Model\Model.edmx
-- --------------------------------------------------

SET QUOTED_IDENTIFIER OFF;
GO
USE [Mvc_EF];
GO
IF SCHEMA_ID(N'dbo') IS NULL EXECUTE(N'CREATE SCHEMA [dbo]');
GO

-- --------------------------------------------------
-- Dropping existing FOREIGN KEY constraints
-- --------------------------------------------------


-- --------------------------------------------------
-- Dropping existing tables
-- --------------------------------------------------

IF OBJECT_ID(N'[dbo].[UserInfo]', 'U') IS NOT NULL
    DROP TABLE [dbo].[UserInfo];
GO

-- --------------------------------------------------
-- Creating all tables
-- --------------------------------------------------

-- Creating table 'SYS_UserInfo'
CREATE TABLE [dbo].[SYS_UserInfo] (
    [UserInfoId] int IDENTITY(1,1) NOT NULL,
    [LoginName] nvarchar(100)  NOT NULL,
    [LoginPassword] nvarchar(100)  NOT NULL,
    [Nickname] nvarchar(100)  NULL,
    [Headphoto] nvarchar(300)  NULL,
    [Email] nvarchar(100)  NULL,
    [Phone] nvarchar(100)  NULL,
    [QQ] nvarchar(100)  NULL,
    [Sex] tinyint  NULL,
    [Birthday] datetime  NULL,
    [Age] int  NULL,
    [Homeplace] nvarchar(200)  NULL,
    [Address] nvarchar(200)  NULL,
    [Hobby] nvarchar(200)  NULL,
    [Sign] nvarchar(300)  NULL,
    [AddTime] datetime  NOT NULL,
    [LastLoginTime] datetime  NULL,
    [LastLoginIp] nvarchar(100)  NULL
);
GO

-- --------------------------------------------------
-- Creating all PRIMARY KEY constraints
-- --------------------------------------------------

-- Creating primary key on [UserInfoId] in table 'SYS_UserInfo'
ALTER TABLE [dbo].[SYS_UserInfo]
ADD CONSTRAINT [PK_SYS_UserInfo]
    PRIMARY KEY CLUSTERED ([UserInfoId] ASC);
GO

-- --------------------------------------------------
-- Creating all FOREIGN KEY constraints
-- --------------------------------------------------

-- --------------------------------------------------
-- Script has ended
-- --------------------------------------------------